package com.dao;

import org.hibernate.Session;
import org.hibernate.SessionFactory;

import com.entity.User;

public class UserDao {

	private SessionFactory sessionFactory;

	public void setSessionFactory(SessionFactory sessionFactory) {
		this.sessionFactory = sessionFactory;
	}

	public void insert(User u){
		Session session = sessionFactory.openSession();
		session.save(u);
	}

}
